1. Field
The present invention relates to a method, system, deployment and an article of manufacture for variable length file entry navigation.
2. Description of the Related Art
A collection of data or information may be given a name in a computer system and stored as a file in the computer system. There are many different types of files for storing various types of data. For example, numerical or text data may be stored in data files, programs in program files, directories in directory files, and so on.
The data stored in a file may be subdivided into entries. In some files, the entries may have a fixed length. In other files, the length of each entry may vary, depending upon the size of the data to be stored at that entry.
Various techniques have been utilized to locate a particular entry in a file. Some files may have external data in the form of a table, index or directory, for example, which lists the location of each entry of the file. In addition, the external data may also indicate the size as well as location of each entry.
Other files may have internal data in the form of a delimiter or marker between each entry to mark the beginning or end of an adjacent entry. One type of marker comprises a unique string of characters. The string of characters may be chosen in a manner which facilitates distinguishing a marker from the data of each entry. In such a file, the entries may be located by traversing the file, starting at the beginning of the file, and examining each byte of data of the file to find the entry markers. In this manner, the beginning and end of each file entry may be calculated.
In another approach, each marker may include size information which indicates the size of the associated entry marked by the marker. Placed at the beginning of an entry, the size information of the marker may be read and used to jump from one entry to the next. If placed at the end of each entry, the size information of the marker may be read and used to jump from one entry to the next in the other direction. Still another approach is to include in each marker, the address of the next marker. Again, placed at the beginning of an entry, the next-marker address information of the marker may be read and used to jump from one entry to the next.
A computer system may have one or more embedded devices, each of which may itself be a specialized computer system that is part of a larger system such as a host computer system. For example, a storage controller may be embedded in a host computer. The embedded storage controller may be housed on a single microprocessor board with the programs stored in ROM or other types of memory. Some embedded systems include an operating system. Other embedded systems may be so specialized that the entire logic can be implemented as a single program.
Embedded systems, like computer systems in general, often generate log information to record various events such as error conditions. Such log information is typically stored in a file to preserve the recorded events. However, storage space is often at a premium, particularly in embedded systems.